package modele;

import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class MCard {
	
	/*
	 * Modele d'une carte, caracterise :
	 * -son image
	 * -son etat (face visible ou caché)
	 * Permet l'accès a ces données
	 */
	
	protected BufferedImage back, front;
	protected boolean visible;
	
	public MCard(BufferedImage image) {
		visible = false;
		
		try {
			back = ImageIO.read(new File("/home/swano/Bureau/image_memory/back.png"));
			front = image;
		} catch (IOException e) {}
	}

	public boolean isVisible() {
		return visible;
	}

	public void switchVisible() {
		visible = !visible;
	}

	public BufferedImage getBack() {
		return back;
	}

	public BufferedImage getFront() {
		return front;
	}
	
}
